package nl.hanze.web.t41.http;

import java.io.File;

public class ErrorPages {
	
	private static String basePath = HTTPServer.webRoot.getPath() +
			HTTPServer.dirSep + "error" + HTTPServer.dirSep;
	
	public static File getPageForError(int errorCode) {
		File errorDoc = new File(basePath + errorCode + ".html");
		if (!errorDoc.exists())
			errorDoc = new File(basePath + "404.html");
		return errorDoc;
	}
}
